package com.xian.loop;

public class WhileTest2 {
    public static void main(String[] args) {
        //需求：珠穆朗玛峰高度8848860毫米，，纸张厚度0.1毫米，，，折叠纸张直到不低于珠穆朗玛峰位置，
        //求折叠几次

        double peakHeight = 8848860;
        double paperThickness = 01.;

        int count = 0;
        while (paperThickness < peakHeight){
            //纸张厚度多一倍
            paperThickness *= 2;
            count ++;
        }
        System.out.println(count);
        System.out.println("厚度"+paperThickness);
    }
}
